<template>
  <div class="app-sidebar sidebar">
    <el-menu default-active="info" router class="menu">
      <el-menu-item index="info">
        <el-icon><pie-chart /></el-icon>
      </el-menu-item>
      <el-menu-item index="consumer">
        <el-icon><User /></el-icon>
      </el-menu-item>
      <el-menu-item index="singer">
        <el-icon><mic /></el-icon>
      </el-menu-item>
      <el-menu-item index="songList">
        <el-icon><Document /></el-icon>
      </el-menu-item>
      <el-menu-item index="article">
        <el-icon><Tickets /></el-icon>
      </el-menu-item>
      <el-menu-item index="application">
        <el-icon><ChatLineSquare /></el-icon>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import {
  PieChart,
  Mic,
  Document,
  User,
  ChatLineSquare,
  Tickets,
} from "@element-plus/icons-vue";
import emitter from "@/utils/emitter";

const collapse = ref(false);
emitter.on("collapse", (msg) => {
  collapse.value = msg as boolean;
});
</script>

<style scoped>
@import "../../assets/css/style.css";
.sidebar {
  display: block;
  position: absolute;
  left: 0;
  top: 60px;
  bottom: 0;
  overflow-y: scroll;
  background-color: transparent;
  padding-left: 4px;
}

.menu {
  background-color: transparent;
  border: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar > ul {
  height: 100%;
}

.sidebar-el-menu:not(.el-menu--collapse) {
  width: 150px;
}
.el-menu-item.is-active {
  background-color: transparent !important;
}
.el-menu-item:hover {
  background-color: transparent;
}
</style>
